package com.ucar.train.service.impl;

import com.github.pagehelper.PageHelper;
import com.ucar.train.dao.SysLogMapper;
import com.ucar.train.dto.SysLogDTO;
import com.ucar.train.service.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: SysLogServiceImpl
 * @Description TODO
 * @Author: Mingzhi.Xu
 * @Create: 2019-07-31 11:27
 **/
@Service
public class SysLogServiceImpl implements SysLogService {

    @Autowired
    private SysLogMapper sysLogMapper;

    @Override
    public void save(SysLogDTO sysLog) {
        sysLogMapper.save(sysLog);

    }

    @Override
    public List<SysLogDTO> findAll(int page, int pageSize) {
        PageHelper.startPage(page, pageSize,"id desc");
        return sysLogMapper.findAll();
    }
}
